package de.slothsoft.commons.swing.window.phase;

import java.awt.Container;

import de.slothsoft.commons.res.CommonMessages;
import de.slothsoft.commons.swing.AboutPanel;
import de.slothsoft.commons.swing.AboutPanel.AboutInfo;
import de.slothsoft.commons.swing.CenterLayout;

public class AboutPhase<I> extends Phase<I> {

	private final AboutInfo info;

	public AboutPhase(I id, AboutInfo info) {
		super(id, CommonMessages.getString("AboutDialog.toolbarButton"));

		this.info = info;
	}

	@Override
	protected void createControls(Container parent) {
		parent.setLayout(new CenterLayout());
		parent.add(new AboutPanel(this.info));
	}

	public AboutInfo getInfo() {
		return this.info;
	}
}
